package com.ruoyi.common.core.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 任务表
 *
 * @TableName sys_task
 */
@Data
@ApiModel("任务模型")
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "sys_task")
public class SysTask implements Serializable {

    @ApiModelProperty(value = "任务id")
    @TableId(type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "是否完成 0:未完成 1:完成 2:暂停")
    private Integer finish;

    @ApiModelProperty(value = "任务名称")
    private String name;

    @ApiModelProperty(value = "任务创建人Id")
    private Long userId;

    @ApiModelProperty(value = "任务创建时间")
    private Date createTime;

    @ApiModelProperty(value = "任务结束时间")
    private Date endTime;

    @ApiModelProperty(value = "任务更新时间")
    private Date updateTime;

    @ApiModelProperty(value = "任务修改者id")
    private Long reviseId;

    @ApiModelProperty(value = "任务修改者名称")
    private String reviseName;

    @ApiModelProperty(value = "任务状态  0:删除，1:启用")
    private Integer state;

    @ApiModelProperty(value = "1:河长巡河,2:智慧巡河")
    private Integer type;

    @ApiModelProperty("巡航设备组合ID")
    private Integer objectId;

    @ApiModelProperty("任务模式：0停止，1遥控模式,2自动模式，3一键返航，4污染源, 11锁定, 12正常, 10急停, 21停止, 22遥控, 23寻迹, 24污染源模式")
    private Integer modelType;

    @ApiModelProperty("巡航设备路径ID（任务模式为2自动模式需传）")
    private Integer planRouteId;

    @ApiModelProperty("控制是否允许云端接管，0x01表示云端接管，0x00表示云端没有接管")
    private Integer isCloudControl;

    @ApiModelProperty("任务计划id")
    private Long planId;

    @ApiModelProperty("巡河时长")
    private Long counttime;

    @ApiModelProperty("巡河路径长度")
    private Long countdistance;

    @TableField(exist = false)
    @ApiModelProperty("控制自动循迹是否带避障功能，1是，0否")
    private Integer isDodge;

    @TableField(exist = false)
    @ApiModelProperty("用户设定的航速，单位m/s（任务模式为2自动模式需传）")
    private float userSpecifiedSpeed;

    @TableField(exist = false)
    @ApiModelProperty(value = "任务附件")
    private List<SysTaskFile> taskFiles;

    @TableField(exist = false)
    @ApiModelProperty(value = "任务实际轨迹")
    private List<SysTaskRoute> taskRoutes;

    @TableField(exist = false)
    @ApiModelProperty(value = "任务规划轨迹集合")
    private List<SysTaskPlanroute> sysTaskPlanrouteList;

    @TableField(exist = false)
    @ApiModelProperty(value = "智慧巡河设备信息")
    private SysDeviceInfo sysDeviceInfo;

    @TableField(exist = false)
    @ApiModelProperty(value = "巡河设备组合信息")
    private SysCruise cruise;

    @TableField(exist = false)
    @ApiModelProperty(value = "任务创建者名称")
    private String userName;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}
